home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-04-26 | 32.6 KB | 1,082 lines |
-
-
-
-
-
-
- PED Version 1.0a
- Copyright (c)1989
- Ross Neilson Wentworth
- All Rights Reserved
-
- Portions Copyright 1987 Borland International
- Portions Copyright 1988 TurboPower Software
-
- PED was created out of frustration. I was frustrated because I
- was unable to compile large programs from within the Turbo Pascal
- editor environment. Attempts at using a couple of shareware
- editor left me unhappy because they didn't support the ability to
- have a macro automatically jump to the line where a compile error
- occurred like in the Turbo Editor. While many commercial editors
- fully support this capability they were not feasible due to a
- tight budget.
-
- Thus, PED was created. Starting with FirstEd from the Turbo
- Pascal Editor Toolbox as a foundation, I added the most important
- features I needed to conduct my daily projects. These features
- are:
-
- o Shell to the Turbo Pascal command-line compiler.
- o Jump to lines where errors occurred when compiling.
- o Display the compiler error message on the status line.
- o Multiple file editing (PED supports up to five windows).
- o Use as little memory as possible when shelling.
-
- That last feature was very important to me since it was what
- prompted me to create my own editor. While PED uses minimal
- memory (around 100k) under normal circumstances, if the computer
- is equipped with LIM 4.0 expanded memory, and at least 350k is
- available, only 10k of conventional memory will be consumed by
- the editor while running the compiler, debugger, or shelling to
- DOS. In other words, the amount of memory wasted is so trivial
- that it can be ignored.
-
- You will notice that PED lacks keyboard macros. This was not an
- oversight. I wrote this program for myself and I hardly ever use
- macros. If you're looking for an editor with macros I highly
- recommend QEdit. A fine shareware editor with an abundance of
- features. If QEdit supported some way to automatically jump to
- error lines and took advantage of expanded memory I would be
- using it instead.
-
- I may be reached at the following address:
-
- Ross Neilson Wentworth
- 1422 Elkgrove Circle, #3
- Venice, CA 90291
- (213)399-1244 (voice)
-
-
-
-
-
-
- I can be reached electronically at Torrance BBS (1:102/345),
- (213)370-9027. This is a limited hour board, 6pm-9am weekdays,
- all weekend. You can send mail to me at 1:102/345.1.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 2 -
-
-
-
-
-
-
- PED Quick Reference Primary Secondary
- =================== ============= =============
-
- Character left LfAr Ctrl-S
- Character Right RtAr Ctrl-D
- Word left Ctrl-LfAr Ctrl-A
- Word right Ctrl-RtAr Ctrl-F
- Line up UpAr Ctrl-E
- Line down DnAr Ctrl-X
- Scroll up Ctrl-W
- Scroll down Ctrl-Z
- Page up PgUp Ctrl-R
- Page down PgDn Ctrl-C
- Beginning of file Ctrl-PgUp Ctrl-Q R
- End of file Ctrl-PgDn Ctrl-Q C
- Beginning of line Home Ctrl-Q S
- End of line End Ctrl-Q D
- Top of screen Ctrl-Home Ctrl-Q E
- Bottom of Screen Ctrl-End Ctrl-Q X
- Go to line Ctrl-J L Alt-J
- Go to column Ctrl-J C
- Top of block Ctrl-Q B
- Bottom of Block Ctrl-Q K
- Jump to marker 0..9 Ctrl-Q 0 .. Ctrl-Q 9
- Set marker 0..9 Ctrl-K 0 .. Ctrl-K 9
- Previous cursor position Ctrl-Q P
- New line Enter Ctrl-M
- Insert line Ctrl-N
- Insert control character Ctrl-P
- Tab Tab Ctrl-I
- Delete current character Del Ctrl-G
- Delete character left Backspace Ctrl-H
- Delete word Ctrl-T
- Delete word left Ctrl-Backspace
- Delete to end of line Ctrl-Q Y
- Delete line Ctrl-Y
- Find pattern Ctrl-Q F
- Find and replace Ctrl-Q A
- Find next Ctrl-L
- Abandon file Ctrl-K Q
- Save and continue edit Ctrl-K S
- Save and exit to DOS Ctrl-K X F2
- Save all and exit to DOS Alt-X
- Save to file Ctrl-K N
- Add window Ctrl-O H Shift-F3
- Next window Ctrl-O N F6
- Previous window Ctrl-O P Shift-F6
- Resize current window Ctrl-O S
- Begin block Ctrl-K B F7
- End block Ctrl-K K F8
- Copy block Ctrl-K C
- Move block Ctrl-K V
- Delete block Ctrl-K Y
- Hide block Ctrl-K H
-
-
-
- - 3 -
-
-
-
-
-
-
- Mark curren word as block Ctrl-K T
- Read block from file Ctrl-K R
- Write block to file Ctrl-K W
- Toggle insert mode Ctrl-V Ins
- Toggle autoindent mode Ctrl-Q I
- Toggle marker display Ctrl-K M
- Change directory Ctrl-J D
- Show version Ctrl-J V
- Show available memory Ctrl-J R
- Set undo limit Ctrl-J U
- Set default extension Ctrl-J E
- Abort command Ctrl-U
- Undo last delete Ctrl-Q U
- Restore line Ctrl-Q L
- Compile F9
- Set compiler options Ctrl-J O
- Set primary file Ctrl-J P
- Debug F10
- Set debug options Ctrl-F10
- Shell Ctrl-F9
-
-
- Of special interest to Turbo Pascal programmers are the following
- commands:
-
- Compile
- Set Compiler Optios
- Set Primary File
- Debug
- Set Debug Options
- Shell
-
- See below for descriptions of these commands.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 4 -
-
-
-
-
-
-
- Cursor Movement Commands
- =================================================================
-
- Character Left LfAr or Ctrl-S
- Moves the cursor one character to the left. This command does
- not work across line breaks; when the cursor reaches column 1, it
- stops.
-
- Character Right RtAr or Ctrl-D
- Moves the cursor one character to the right. This command does
- not work across line breaks; when the cursor reaches the right-
- hand edge of the text window, the text starts scrolling
- horizontally until it reaches the extreme right edge of the line
- (column 999), where it stops.
-
- Word Left Ctrl-LfAr or Ctrl-A
- Moves the cursor to the beginning of the word to the left. This
- command works across line breaks.
-
- Word Right Ctrl-RtAr or Ctrl-F
- Moves the cursor to the beginning of the word to the right. This
- command works across line breaks.
-
- Line Up UpAr or Ctrl-E
- Moves the cursor to the line above. If the cursor is on the top
- line of the window, the window scrolls down one line (if there's
- more text to scroll).
-
- Line Down DnAr or Ctrl-X
- Moves the cursor to the line below. If the cursor is on the last
- line of the window, the window scrolls up one line (if there's
- more text to scroll).
-
- Scroll Up Ctrl-W
- Scrolls up toward the beginning of the file, one line at a time.
- The cursor remains on its line until it reaches the bottom of the
- window.
-
- Scroll Down Ctrl-Z
- Scrolls down toward the end of the file. The cursor remains on
- its line until it reaches the top of the window.
-
- Page Up PgUp or Ctrl-R
- Moves the cursor on page up with an overlap of one line.
-
- Page Down PgDn or Ctrl-C
- Moves the cursor down one page with an overlap of one line.
-
- Beginning of File Ctrl-PgUp or Ctrl-Q R
- Moves the cursor to the first character in the file.
-
- End of File Ctrl-PgDn or Ctrl-Q C
- Move the cursor to the last character in the file.
-
-
-
-
- - 5 -
-
-
-
-
-
-
- Beginning of Line Home or Ctrl-Q S
- Moves the cursor to column 1 of the current line.
-
- End of Line End or Ctrl-Q D
- Moves the cursor to the end of the current line (the position
- following the last nonblank character on the line). Trailing
- blanks are always removed from all lines to preserve space.
-
- Top of Screen Ctrl-Home or Ctrl-Q E
- Moves the cursor to the first line displayed in the active
- window. The cursor remains in the same column.
-
- Bottom of Screen Ctrl-End or Ctrl-Q X
- Moves the cursor to the last line displayed in the active window.
- The cursor remains in the same column.
-
- Go to Line Ctrl-J L or Alt-J
- Prompts for a line number and moves the cursor to the specified
- line. Any positive integer in the range 1 to 32,767 is valid.
- If the value is preceded by a plus (+) or minus (-) sign, the
- target line number will be calculated relative to the current
- line. Line numbers are counted from the beginning of the file.
-
- Go to Column Ctrl-J C
- Prompts for a column number and moves the cursor to the specified
- column in the current line. Any positive integer in the range 1
- to 999 is valid. If the value is preceded by a plus (+) or minus
- (-) sign, the target column number will be calculated relative to
- the current column.
-
- Top of Block Ctrl-Q B
- Moves the cursor to the position of the block-begin marker set
- with Ctrl-K B. The command works even if the block is hidden or
- the block-end marker is not set.
-
- Bottom of Block Ctrl-Q K
- Moves the cursor to the position of the block-end marker set with
- Ctrl-K K. The command works even if the block is hidden or the
- block-begin marker is not set.
-
- Jump to Marker 0..9 Ctrl-Q 0 .. Ctrl-Q 9
- Moves the cursor to one of the ten text markers with the Set
- marker command. Ctrl-Q 0 jumps to marker 0, Ctrl-Q 1 jumps to
- marker 1, and so on. If the specified marker has not been set,
- the cursor is not moved.
-
- Set Marker 0..9 Ctrl-K 0 .. Ctrl-K 9
- Sets one of the ten text markers at the current position of the
- cursor. Ctrl-K 0 sets marker 0, Ctrl-K 1 sets marker 1, and so
- on.
-
-
-
-
-
-
-
- - 6 -
-
-
-
-
-
-
- Previous Cursor Position Ctrl-Q P
- Moves to the last cursor position. This command is particularly
- useful to move back to the previous position after a Find or
- Find-and-Replace operation.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 7 -
-
-
-
-
-
-
- Insert and Delete Commands
- =================================================================
-
- New Line Enter or Ctrl-M
- In Insert mode, this command inserts a line break at the cursor's
- position. If AutoIndent mode is in effect, the cursor moves to
- the next line and to the same column as the first nonblank
- character in the previous line; otherwise, it moves to column 1
- of the new line.
-
- In Overwrite mode, this command moves the cursor to column 1 of
- the next line without inserting a new line, whether Autoindent
- mode is in effect or not. A new line will be inserted if you're
- in Overwrite mode and the cursor is on the last line of the file.
-
- Insert Line Ctrl-N
- Inserts a line break at the cursor's position. The cursor does
- not move.
-
- Insert Control Character Ctrl-P
- Allows control characters to be entered into the text. For
- example, pressing Ctrl-P and then Ctrl-B would insert Ctrl-B into
- the text. Control characters are always displayed as highlighted
- capital letters.
-
- Delete Current Character Del or Ctrl-G
- Deletes the character under the cursor and moves any characters
- to the right of the cursor one position to the left. This
- command does not work across line breaks.
-
- Delete Character Left Backspace or Ctrl-H
- Moves the cursor one character to the left and deletes the
- character positioned there. Any characters to the right of the
- cursor are moved one position to the left. If the cursor is at
- column 1 at the time the command is given, the invisible end-of-
- line marker for the previous line is deleted instead and the two
- lines joined.
-
- Delete Word Ctrl-T
- Deletes the word to the right of the cursor. This command works
- across line breaks and thus may be used to remove line breaks.
-
- Delete Word Left Ctrl-Backspace
- Deletes the word to the left of the cursor. This command works
- across line breaks and thus may be used to remove line breaks.s
-
- Delete to End of Line Ctrl-Q Y
- Deletes all the text from the position of the cursor to the end
- of the line.
-
- Delete Line Ctrl-Y
- Deletes the line containing the cursor and moves any lines below
- up one line. The cursor moves to column 1 of the next line.
-
-
-
-
- - 8 -
-
-
-
-
-
-
- Find-and-Replace Commands
- =================================================================
-
- Find Ctrl-Q F
- Lets you search for a string of up to 67 characters. When you
- enter this command, you will be asked for a search string. The
- last search string entered (if any) will be displayed. You can
- select it again by pressing Enter, edit it, or enter a new search
- string. Esc or Ctrl-U will cancel a search command, and Ctrl-P
- can be used to enter control characters. For example, to find a
- period at the end of a line you would search for ".CTRL-M", where
- CTRL-M was entered by pressing Ctrl-P and Ctrl-M.
-
- After the search string is entered, you must specify your search
- options. The options you used last are displayed. You can enter
- new options (canceling the old ones), edit the current options,
- or select them again by pressing Enter. The following options
- are available:
-
- B Searches backwards from the current cursor
- position toward the beginning of the file.
- G Searches globally. The entire file is
- scanned for the search string, regardless of
- the current position of the cursor. The
- search starts at the beginning of the file
- if searching forwards; at the end if
- searching backwards.
- L Limits searches to the currently marked
- block.
- U Ignores case; treats all alphabetic
- characters as if they were upper-case.
- W Searches for whole words only; skips
- patterns embedded in other words.
-
- If the text contains a target matching the search string, the
- target is highlighted and the cursor is positioned just beyond
- it.
-
- Find-and-Replace Ctrl-Q A
- This operation works the same as the Find command except that you
- can replace the found string with any other string of up to 67
- characters. After the entering the search string, you are asked
- to enter the replacement string. The last replacement string
- entered, if any, will be displayed; you may accept it, edit it,
- or enter a new string.
-
-
-
-
-
-
-
-
-
-
-
-
- - 9 -
-
-
-
-
-
-
- Finally, you are prompted for options. The options you used last
- are displayed first. You may enter new options (canceling the
- old ones), edit the current options, or select them by pressing
- Enter. The options available are the same as those for the Find
- command except the exception of the following:
-
- N Replaces without asking; does not prompt for
- confirmation at each occurrence of the
- search string.
-
- If the text contains a target matching the search string, the
- target is highlighted and the cursor is positioned just beyond
- it. You are then asked if you wish to replace it. Press Y to
- replace it, N to ignore it, or A to replace it and all subsequent
- matches without asking. You can abort the operation by pressing
- Q. If you select N (no prompt) option, this question will not be
- asked.
-
- Find Next Ctrl-L
- Repeats the last search operation. If the last search command
- called for a Find operation, the same search string and options
- will be repeated; for a Find-and-Replace operation, the
- replacement string will be reused as well.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 10 -
-
-
-
-
-
-
- File Commands
- =================================================================
-
- Abandon File Ctrl-K Q
- If the file in the active window has not been modified, this
- command closes the window. Otherwise, you are asked to verify
- that the file would be abandoned before the window is closed. If
- the active window is the only window open, this command can be
- used to quit the program.
-
- Save and Edit Ctrl-K S
- Simply saves the tile in the active window.
-
- Save and Exit to DOS Ctrl-K X or F2
- Saves the file in the active window. If the active window is the
- only window open, this command will quit the program, otherwise,
- the window is closed and you may continue editing in another
- window.
-
- Save All and Exit to DOS Alt-X
- Saves all files that have been modified and exits to DOS.
-
- Save to File Ctrl-K N
- Prompts you for a file name, the saves the file in the current
- window in the specified file. This becomes the new name for the
- file in the window (and in any other windows that display the
- file). This command is particularly useful when editing NONAME
- files.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 11 -
-
-
-
-
-
-
- Window Commands
- =================================================================
-
- Add Window Ctrl-O H or Shift-F3
- Opens another window. You will be prompted for a file to edit;
- if you do not specify one, a NONAME file is created. You can
- later save it as a named file with the Save-to-File command.
-
- If too many windows are opened (limit of five) or if the active
- window is too small to be divided in half (fewer than seven
- screen lines including the status line), you will get an error
- message.
-
- Next Window Ctrl-O N or F6
- Makes the next window the active window.
-
- Previous Window Ctrl-O P or Shift-F6
- Makes the previous window the active window.
-
- Resize Active Window Ctrl-O S
- Changes the size of the active window. You can adjust the size
- by pressing the UpAr and DnAr keys. When you are finished,
- pressing Enter or Esc returns you to the editor.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 12 -
-
-
-
-
-
-
- Block Commands
- =================================================================
-
- Begin Block F7 or Ctrl-K B
- Marks the beginning of a block. The marker itself is not visible
- on the screen, and the block becomes invisible only when the
- end-block marker is set. You can also use the begin-block as an
- extra text marker and jump directly to it with Ctrl-Q B.
-
- End Block F8 or Ctrl-K K
- Marks the end of a block. Like the begin-block marker, the end-
- block marker is invisible, and the block itself will not be
- displayed unless both markers are set. You can also use the
- end-block marker as an extra text marker and jump directly to it
- with Ctrl-Q K.
-
- Copy Block Ctrl-K C
- Creates a copy of a marked and displayed block at the current
- cursor position. The original block is left unchanged, and the
- markers are placed around the new copy of the block.
-
- Move Block Ctrl-K V
- Moves a marked and displayed block from its current position to
- the cursor's position. The markers remain around the block at
- its new position.
-
- Delete Block Ctrl-K Y
- Deletes a marked and displayed block. Although the Undo last
- deletion can usually restore portions of an accidentally deleted
- block, there is no command to restore a deleted block in its
- entirety, so use this command with care.
-
- Hide Block Ctrl-K H
- Toggles off and on the visual marking of a block.
-
- Mark Single Word Ctrl-K T
- Marks a single word as a block, combining the functions of the
- begin-block and end-block commands. If the cursor is positioned
- within a word, that word will be marked. If it is not within a
- word, then the word to the right of the cursor will be marked,
- and if there is no word to the right of the cursor, then the word
- to the left will be marked.
-
- Read Block from File Ctrl-K R
- Read a file into the text at the cursor's current position
- exactly as if it were copied from another part of the text. The
- file read in is marked as a block.
-
-
-
-
-
-
-
-
-
-
- - 13 -
-
-
-
-
-
-
- Write Block to File Ctrl-K W
- Writes the currently marked block to a file. You are first
- prompted for a file name. If the file already exists, you are
- asked if you want to overwrite it. If the file does not exist, a
- new file is created. The block is left unchanged, and the block
- markers remain in place. If no block is marked, this command is
- ignored.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 14 -
-
-
-
-
-
-
- Miscellaneous Commands
- =================================================================
-
- Abort Ctrl-U
- Halts an operation in progress. The keyboard buffer is checked
- regularly to see if the Abort command has been issued; if it has,
- the buffer is emptied and the operation is stopped.
-
- Restore Line Ctrl-Q L
- Will undo any changes made to a line of text as long as you have
- not left the line. The line is restored to its previous contents
- regardless of the changes made.
-
- Undo Last Deletion Ctrl-Q U
- Restores whole lines deleted with the delete-line command (Ctrl-
- Y) or the delete-block command (Ctrl-K Y). It does not restore
- single characters or words. To undo your most recent changes to
- the current line, use the restore-line command (Ctrl-Q L). The
- size of the "undo buffer" is specified with the set-undo-limit
- command.
-
- Set Undo Limit Ctrl-J U
- Sets the size of the "undo buffer" which stores deleted lines.
- The default value is 20 lines unless you have changed it with the
- installation program.
-
- Toggle Insert Mode Ins or Ctrl-V
- Selects the Insert or Overwrite mode. In insert mode, text to
- the right of the cursor is moved to the right as new text is
- entered. In Overwrite mode, any text beneath the cursor is
- overwritten when new text is entered. Notice that the cursor's
- size is an indication oof the mode you are in: A thin cursor
- indicates Overwrite, while a slightly fatter cursor indicates
- Insert.
-
- Toggle Autoindent Ctrl-Q I
- When Autoindent mode is in effect, the New line command (Enter or
- Ctrl-M) will move the cursor to the next row and to the same
- column as the first nonblank character on the previous line.
-
- Toggle Marker Display Ctrl-K M
- Hides or makes all text markers visible. Setting a new text
- marker automatically turns on Marker display if it was previously
- turned off.
-
- Change Directory Ctrl-J D
- Changes the active drive and directory.
-
- Set Default Extension Ctrl-J E
- Sets the default extension for file names. This extension is
- automatically added to file names lacking extensions. For
- example, if you have set the default extension to .PAS and are
- about to load SAMPLE.PAS, you can simply enter SAMPLE when
- prompted for a file name.
-
-
-
- - 15 -
-
-
-
-
-
-
- Show Version Ctrl-J V
- Displays the version of PED currently in use.
-
- Show Available Memory Ctrl-J R
- Shows you the amount of random access memory (RAM) available.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 16 -
-
-
-
-
-
-
- Programmer Commands
- =================================================================
-
- Compile F9
- Executes the Turbo Pascal compiler (TPC.EXE), passing the file
- name of the active window as the file to compile (unless you have
- set the Primary file, in which case that file is compiled).
- TPC.EXE must be somewhere on the PATH. Upon returning from the
- compiler, if a compile error occurred the cursor will be
- positioned on the offending line and the compiler error message
- will be displayed.
-
- Set Compiler Options Ctrl-J O
- Sets the compiler options used when running the compiler (F9).
- The changes remain in effect until you quit the editor. If you
- wish to make permanent changes to the compiler options you may do
- so with EDINST.
-
- Set Primary File Ctrl-J P
- Sets the name of the primary file to use when compiling. If a
- primary file name is specified it will be compiled instead of the
- active window's file when the compiler is invoked. The named
- file must exist, if it does not an error message will be
- displayed.
-
- Debug F10
- Runs Turbo Debugger. If a "primary" file is defined it will run
- the debugger using it with the extension "EXE", otherwise it will
- use the file name in the current window with the extension "EXE".
- If the file has been modified since the last save or compile it
- will be recompiled before running the debugger.
-
- Set Debug Options Ctrl-F10
- This string is passed to along with the program name to debug as
- command line options. For example, if your program expects a
- file name on the command line you should use this command. This
- command is equivelent to the "Options, Parameters" command in the
- Turbo Pascal Integrated Environment.
-
- Shell Ctrl-F9
- Shells to DOS. You may return to the editor by entering "EXIT".
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 17 -
-